import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet.*;

public class Login {
        static Form form = new Form("Acessar o Blogao");
        static TextField login = new TextField("Login:", "", 10, TextField.ANY);
        static TextField password = new TextField("Senha:", "", 10, TextField.PASSWORD);
        static Command cancel = new Command("Cancelar", Command.CANCEL, 2);

        public static Form getForm(){
                form.append(login);
                form.append(password);
                form.addCommand(cancel);
                return form;
        }

        public static boolean validateLogin() {
                return !(login.getString().equals("")) && !(password.getString().equals(""));
        }

        public static TextField getUserName() {
                return login;
        }
}